const mongoose = require('mongoose')
const Schema = mongoose.Schema
const ObjectId = Schema.Types.ObjectId

const Sprint = new mongoose.Schema({
  sprint_name: String,
  sprint_status: { // 0进行中，1已完成
    type: Number,
    default: 0
  },
  sprint_starttime: {
    type: Date,
    default: Date.now()
  },
  sprint_endtime: {
    type: Date,
    default: Date.now()
  },
  sprint_last_modify_time: {
    type: Date,
    default: Date.now()
  },
  group_id: {
    type: ObjectId,
    ref: 'Group'
  }
})
module.exports = mongoose.model('Sprint', Sprint)
